/*********************************************************************************
 *      Copyright:  (C) 2023 LN
 *                  All rights reserved.
 *
 *       Filename:  get_time.c
 *    Description:  This file 
 *                 
 *        Version:  1.0.0(2023年04月08日)
 *         Author:  Li Haipeng <NULL>
 *      ChangeLog:  1, Release initial version on "2023年04月08日 15时02分31秒"
 *                 
 ********************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

int get_time(char *t,int size) 
{
    time_t       current_time;
    struct tm   *now_time = NULL;

    time(&current_time);
    now_time = localtime(&current_time);

    strftime(t, size , "%F %T", now_time);

    return 0; 
}
